home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part1 / 5838 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.0 KB

  1. Path: solon.com!not-for-mail
  2. From: swedecj@vcnet.com (Carl Jacobson)
  3. Newsgroups: comp.lang.c.moderated,comp.lang.c
  4. Subject: Please help me elect rounding of int division
  5. Date: 21 Feb 1996 08:34:55 -0600
  6. Organization: Internet Access of Ventura County 805.383.3500
  7. Sender: clc@solutions.solon.com
  8. Approved: clc@solutions.solon.com
  9. Message-ID: <4gfaif$1tt@solutions.solon.com>
  10. NNTP-Posting-Host: solutions.solon.com
  11. X-Newsreader: Forte Free Agent 1.0.82
  12.  
  13. Please help me solve this task.
  14.  
  15. I have now tried (Borland C++ version 3.0) for two solid days to write
  16. a function that would allow me to round the quotient of (a/b) up or
  17. down based on the "nearest" integer instead of being truncated to the
  18. smallest. If exactly half way, return the "odd."
  19.  
  20. Fatigue is now blinding me from any solution - can anyone help please.
  21. I have a feeling that this is an old "knot."
  22.  
  23. ---------------------------------------------------------------
  24. Carl Jacobson
  25. P.O. Box 3607                          swedecj@vcnet.com
  26. Thousand Oaks, CA 91359                phone: US 805.523.1724
  27.